list1 = []
list1.append("朱序")
list1.append("书记")
list1.append("村长")
list1.append("小黄")
print(list1)

list1.insert(0,"涛哥")
print(list1)

list1.extend(["关羽","张飞","李新涛"])
print(list1)

list2 = ["天才","小黄","张无忌","村长"]
item = list2.pop(2)
print(item)
print(list2)

list3 = ["天才","小黄","张无忌","村长"]
list3.remove("张无忌")
print(list3)


list4 = ["天才","小黄","张无忌","村长"]
list4[2] = "新涛"
print(list4)

list5 = ["天才","小黄","张无忌","村长","张三丰"]
print(list5[2])

#将list5里面所有的张姓改成王姓
for i in range (len(list5)):
    if list5[i].startswith("张"):
        newName = list5[i][1:]
        newName = "王" + newName
        list5[i] = newName


print(list5)